package Eyjafjalla.helper;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.core.Settings;

import java.util.ArrayList;

public class ImageHelper {

    public static final ArrayList<TextureAtlas.AtlasRegion> specialImg;

    public static TextureAtlas.AtlasRegion getByIndex(int index){
        return specialImg.get(index);
    }

    public static void initThis(){
    }

    public static void drawSpecialImgOnCard(AbstractCard _inst, int imgID, SpriteBatch sb, Color renderColor){
        sb.setColor(renderColor.cpy());
        sb.draw(getByIndex(imgID),_inst.current_x-256F,_inst.current_y-256F,256F,256F,512F,512F,_inst.drawScale* Settings.scale,_inst.drawScale*Settings.scale,_inst.angle);
    }

    static {
        specialImg = new ArrayList<>();
        specialImg.add(new TextureAtlas.AtlasRegion(new Texture("EyjafjallaResources/img/512/fire.png"),0,0,512,512));
        specialImg.add(new TextureAtlas.AtlasRegion(new Texture("EyjafjallaResources/img/512/extra.png"),0,0,512,512));
        specialImg.add(new TextureAtlas.AtlasRegion(new Texture("EyjafjallaResources/img/512/extraBorder.png"),0,0,512,512));
        specialImg.add(new TextureAtlas.AtlasRegion(new Texture("EyjafjallaResources/img/512/cloudbg.png"),0,0,512,512));
        specialImg.add(new TextureAtlas.AtlasRegion(new Texture("EyjafjallaResources/img/events/DreamKey.png"),0,0,64,64));
    }
}
